package com.drug.mingkang.model.vo;

import org.springframework.util.StringUtils;

import java.io.Serializable;

public class ImmPurchaseVo implements Serializable {

    /**
     *  采购单id
     */
    private String purchaseId;
    /**
     * 页
     */
    private int page;

    /**
     * 行
     */
    private int limit;



    /**
     * 采购人
     */
    private String operator;

    /**
     * 大于这个时间
     */
    private String  startTime;

    /**
     * 小于这个时间
     */
    private String  endTime;

    /**
     * 审核状态
     */
    private String reviewState;

    /**
     * 分公司ID
     */
    private String immId;

    /**
     * 审核状态
     */
    private String isva;

    public String getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(String purchaseId) {
        this.purchaseId = purchaseId;
    }

    public String getImmId() {
        return immId;
    }

    public void setImmId(String immId) {
        this.immId = immId;
    }

    public int getPage() {
        return (page-1)*limit;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getStartTime() {
        if (!StringUtils.isEmpty(startTime)){
            return startTime+ " 00:00:00";
        }
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        if (!StringUtils.isEmpty(endTime)){
            return endTime+ " 23:59:59";
        }
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getReviewState() {
        return reviewState;
    }

    public void setReviewState(String reviewState) {
        this.reviewState = reviewState;
    }




    public String getIsva() {
        return isva;
    }

    public void setIsva(String isva) {
        this.isva = isva;
    }

    @Override
    public String toString() {
        return "ImmPurchaseVo{" +
                "purchaseId='" + purchaseId + '\'' +
                ", page=" + page +
                ", limit=" + limit +
                ", operator='" + operator + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", reviewState='" + reviewState + '\'' +
                ", immId='" + immId + '\'' +
                ", isva='" + isva + '\'' +
                '}';
    }
}
